/**
 * Copyright (C) 2012 The SkyTvOS Project
 * <p/>
 * Version     Date           Author
 * ─────────────────────────────────────
 * 2015年4月7日         Root.Lu
 */

package com.coocaa.x.service.litecontent.data;

import java.util.ArrayList;
import java.util.List;

import com.coocaa.x.framework.data.JObject;

public class ResultPackage extends JObject {
    public static class ResourcePackage<T> extends JObject {
        public int total_count = 0;
        public List<T> resource_items = null;

        public ResourcePackage() {

        }

        public synchronized void add(T item) {
            if (resource_items == null)
                resource_items = new ArrayList<T>();
            resource_items.add(item);
            this.total_count = resource_items.size();
        }
    }

    public int error_code = 0;
    public String error_msg = "success";

    public ResultPackage() {

    }
}